package com.oracle.malldemo.service.impl;

import com.oracle.malldemo.dao.UsersDao;
import com.oracle.malldemo.dao.impl.UsersDaoImpl;
import com.oracle.malldemo.domain.Users;
import com.oracle.malldemo.service.UsersService;

import java.util.List;

public class UsersServiceImpl implements UsersService {

    private UsersDao usersDao = new UsersDaoImpl();

    @Override
    public boolean save(Users u) {
        return usersDao.save(u);
    }

    @Override
    public boolean update(Users u) {
        return usersDao.update(u);
    }

    @Override
    public Users queryUserByUid(Integer uid) {
        return usersDao.queryUserByUid(uid);
    }

    @Override
    public List<Users> queryAllUsers() {
        return usersDao.queryAllUsers();
    }

    @Override
    public boolean delete(Integer uid) {
        return usersDao.delete(uid);
    }

    @Override
    public boolean reg(Users u) {
        return usersDao.reg(u);
    }

    @Override
    public Users login(String username, String password) {
        return usersDao.login(username,password);
    }

}
